import {getBucket} from "~/server/cos-index";

// 获取桶内所有的对象
export default defineEventHandler(async (event) => {
    const method = event.node.req.method
    if (method === 'GET') {
        return await getBucket()
    } else {
        const body = await readBody(event)
        return {
            body,
        }
    }
})